package com.cloudkinto.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cloudkinto.entity.OrderOutputDo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cloudkinto.entity.OrderProductSellCountEntity;
import com.cloudkinto.extentity.OrderOutputExportDto;
import com.cloudkinto.extentity.OutputChannelDto;
import com.cloudkinto.extentity.StorageSituationDto;
import com.cloudkinto.extentity.order.LabellaOrderTrackNumberDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 * @author 张永远
 * @since 2020-06-04
 */
@Mapper
public interface OrderOutputDao extends BaseMapper<OrderOutputDo> {
    List<OrderProductSellCountEntity> selectBastSellProduct(IPage<OrderProductSellCountEntity> page, @Param("map")Map<String, String> map);
    List<OrderProductSellCountEntity> selectSellProductStatistics(@Param("map")Map<String, String> map);

    StorageSituationDto getStorageSituation(@Param("map") Map map);

    List<OutputChannelDto> getOutputDeliveryChannel(@Param("map") Map map);

    List<OutputChannelDto> getOutputFBAChannel(@Param("map") Map map);

    List<OrderOutputExportDto> selectExportListByIds(@Param("outIdCollect") List<String> outIdCollect);

    List<OrderOutputDo> getListByTrackNumber(String trackNumber, String beginTime, String endTime, Long companyId);


    void insertBatch(List<OrderOutputDo> list);

    List<LabellaOrderTrackNumberDto> getLabellaOrderTrackNumber(@Param("platformOrderNos") List<String> platformOrderNos);
}
